/* General styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: #f4f7fb; /* 柔和背景色 */
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    line-height: 1.5;
    padding-top: 0px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
}

.logo-img {
    height: 40px; /* 调整LOGO的高度 */
}



.user-info {
    font-size: 16px;
}

.user-info a {
    color: white;
    text-decoration: none;
    margin-left: 10px;
}

.user-info a:hover {
    text-decoration: underline;
}


/* 浮动页脚样式 */
footer {
    position: fixed; /* 固定在视口底部 */
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #3498db; /* 蓝色背景 */
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    border-top: 2px solid #2980b9;
}

/* Main container layout */
.container {
    display: flex;

    gap: 20px;
    justify-content: space-between;
    flex-grow: 1;
    padding-bottom: 60px;
}

/* Sidebar styles */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;

}

/* Sidebar toggle link */
.sider {
    background-color: #3498db;
    padding: 15px;
    margin-bottom: 15px;
    display: block;
    text-align: center;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Sidebar links */
.nav-list {
    margin-top: 20px;
    display: none;
}


.nav-list.open {
    display: block;
}

.sidebar .nav-list li {
    list-style-type: none;
    margin-bottom: 10px;
    text-align: center;
}

.sidebar .nav-list a {
    background: linear-gradient(45deg, #b6bb1d, #6c763d);
    color: white;
    padding: 12px 20px;
    display: block;
    border-radius: 8px;
    text-decoration: none;
    font-weight: normal;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover effect for sidebar links */
.sider:hover, .sidebar .nav-list a:hover {
    background-color: #2980b9;
    transform: translateX(5px); /* 动态效果 */

}

/* Content area */
.content {
    flex: 1;
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Table styles */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    align-content: center;
    border: 2px solid #333333;
}

.user-table th, .user-table td {
    padding: 12px 18px;
    text-align: center;
    border: 2px solid #007bff;

}

.user-table th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
    border: 2px solid #007bff;
}

.user-table tr:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-collapse: collapse;

}

/* Action buttons */
.actions a, .actions button {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 10px;
}

/* Edit button */
.edit-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
}

.edit-btn:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Delete button */
.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
}

.delete-btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Form for deleting user */
.delete-form {
    display: inline;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 10px;
    }

    .content {
        padding: 15px;
    }

    .sidebar.open .nav-list {
        display: block;
    }
}

/* 表单容器样式 */
form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

/* 表单标签样式 */
form label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* 表单输入框样式 */
form input, form select, form textarea {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

form input:focus, form select:focus, form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* 输入框错误样式 */
form input.error, form select.error, form textarea.error {
    border-color: #e74c3c;
    background-color: #f8d7da;
}

/* 表单按钮样式 */
form button {
    background-color: #007bff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

form button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

form button:active {
    transform: translateY(0);
}

/* 提示信息样式 */
form .form-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: -10px;
    margin-bottom: 15px;
}

.flash-messages {
    list-style-type: none;
    padding: 0;
}

.flash-messages li {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
}

.flash-messages .success {
    background-color: #d4edda;
    color: #155724;
}

.flash-messages .error {
    background-color: #f8d7da;
    color: #721c24;
}
